/*
 * ServiceMessageHolder.java
 * business
 *
 * Created by ChenTao on 2017/1/9.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.viewholder;

import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.yidiandao.business.R;
import com.yidiandao.business.ui.widget.listview.ViewHolder;
import com.yidiandao.business.utils.ImageLoader;

/** 客服消息-ListItem */
public class ServiceMessageHolder extends ViewHolder {

    public RelativeLayout mRootLayout;
    private ImageView ivImage;
    private TextView tvTitle;
    private TextView tvContent;
    private TextView tvDate;

    @Override
    protected void initView(View rootView) {
        ivImage = (ImageView) rootView.findViewById(R.id.iv_image);
        tvTitle = (TextView) rootView.findViewById(R.id.tv_title);
        tvContent = (TextView) rootView.findViewById(R.id.tv_content);
        tvDate = (TextView) rootView.findViewById(R.id.tv_date);
        mRootLayout = (RelativeLayout) rootView.findViewById(R.id.root_layout);

        initServiceMessageUI();
    }

    private void initServiceMessageUI() {
        ImageLoader.loadLocalImage(mContext, ivImage, R.mipmap.ic_service_message);
        tvTitle.setText(R.string.service_message);
        tvContent.setText(R.string.click_to_show_service_message);
    }

    @Override
    protected int getItemLayoutId() {
        return R.layout.item_message_date;
    }
}
